package com.xnfh.login.viewmodel

import com.xnfh.network.base.BaseRepository
import com.xnfh.framework.bean.RespStateData
import com.xnfh.common.bean.UserInforBean
import com.xnfh.network.manager.ApiManager
import okhttp3.RequestBody

/**
 * @Description:
 * @Author: ziheng
 * @CreateDate: 2023/11/9 19:24
 * @UpdateUser: ziheng
 * @UpdateDate: 2023/11/9 19:24
 * @UpdateRemark: 更新说明
 */
class LoginRes : BaseRepository() {

    suspend fun requestLogin(requestBody: RequestBody, data: RespStateData<String>) = dealResp(
        { ApiManager.api.reqeustLogin(requestBody) }, data
    )

    suspend fun requestUserInfor(data: RespStateData<UserInforBean>) = dealResp(
        { ApiManager.api.requestUserInfor() }, data
    )
}